﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="GradeListControl.ascx.vb" Inherits="SISSAT.WebDevelopment.Shared.UserControls.GradeListControl" %>
<%@ Register TagPrefix="sissat" TagName="DropDownListControl" Src="/Shared/UserControls/DropDownListBaseControl.ascx" %>
<sissat:DropDownListControl ID="GroupDropDownList" runat="server" LabelText="" CssClass="miniddl" IsReadOnly="false" AutoPostBack="true" />
<asp:Repeater ID="GradeRepeater" runat="server">
    <ItemTemplate>
        <div>
            <div class="input">
			    <div class="label">
                    <asp:RequiredFieldValidator ID="GradeRequiredFieldValidator" runat="server" 
                                                Display="Static"
                                                ErrorMessage="*" 
                                                ControlToValidate="GradeTextBox" 
                                                ValidationGroup="GradeListControlGroup"
                                                CssClass="error" />
                    <%#Eval("Name")%></div>
			    <div class="data">
                    <asp:HiddenField ID="TypeIdHiddenField" runat="server" Value=<%#Eval("ExaminationTypeId")%> />
                    <asp:HiddenField ID="ExamIdHiddenField" runat="server" Value="0" />
                    <asp:HiddenField ID="GradeHiddenField" runat="server" Value="0" />
                    <asp:TextBox ID="GradeTextBox" runat="server" CssClass="minitextbox readonly alignr" ToolTip=<%#Eval("Description")%>>0</asp:TextBox>
                    <asp:RegularExpressionValidator ID="GradeRegExValidator" runat="server"
                                                    Display="Dynamic"
                                                    ErrorMessage="Invalid grade. (e.g. 1-100)" 
                                                    ControlToValidate="GradeTextBox" 
                                                    ValidationExpression="^([0-9]|[1-9]\d|100)$"
                                                    ValidationGroup="GradeListControlControlGroup"
                                                    CssClass="error" />
			    </div>
            </div>
        </div>
    </ItemTemplate>
</asp:Repeater>
<asp:Panel ID="ButtonPanel" runat="server" CssClass="input">
<div class="label"></div>
<div class="data">
    <div class="error"><%=ErrorMessage%></div>
    <div class="buttons">
	    <asp:Button ID="SubmitButton" runat="server" CssClass="button" Text="Save Changes" ToolTip="Save Changes" ValidationGroup="GradeListControlGroup" />
    </div>
</div>
</asp:Panel>
